package com.zhang.mqtt.gateway;

import org.springframework.integration.annotation.MessagingGateway;
import org.springframework.integration.mqtt.support.MqttHeaders;
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Component;

/**
 * @Author 超chao
 * @Description mqtt 网关
 * @Date 2025/7/24/周四 15:59
 * @Version 1.0
 */
@Component
@MessagingGateway(defaultRequestChannel = "messageOutboundChannel")
public interface MqttGateway {

    public abstract void sendMsgToMqtt(@Header(value = MqttHeaders.TOPIC) String topic, String payload);
    public abstract void sendMsgToMqtt(@Header(value = MqttHeaders.TOPIC) String topic,@Header(value = MqttHeaders.QOS) int qos , String payload);
}
